# -*- encoding:utf-8 -*-
# @Time: 2022/11/11 16:12
# @Author :xibin
# @Email: xibin@maqu. com
# @File: celery_main.py
# @Software: PyCharm
from celery import Celery
import os

os.environ.setdefault('DJANGO_SETTINGS_MODULE','drfstudy.settings') #设置配置
app = Celery('drfstudy')  #创建celery应用

app.config_from_object('celery_tasks.celery_config') #引入celery配置,任务队列

app.autodiscover_tasks(['celery_tasks.email'],)  #导入任务，自动发送任务,里面应该是元组，所以要加逗号，给了逗号才是元组
